#ifndef PROGRAMMEUTILS_H_
#define PROGRAMMEUTILS_H_

class Metadata;
class MetadataListManager;

void PlayProgramme(const QString &filename, const MetadataListManager &programme_list);

template <typename T>
void checkedSetText(T *item, const QString &text)
{
    if (item) item->SetText(text);
}

void checkedSetText(class LayerSet *container, const QString &item_name,
                           const QString &text);

QStringList GetProgrammeDirs();
QString getDisplayRating(const QString &rating);
QString getDisplayUserRating(float userrating);
QString getDisplayLength(int length);

bool isDefaultCoverFile(const QString &coverfile);

#endif // PROGRAMMEUTILS_H_
